//
//  WY3SDK.h
//  WaWaYaYaLogin
//
//  Created by telen on 15/9/9.
//  Copyright (c) 2015年 刘赞黄Telen. All rights reserved.
//

#import <UIKit/UIKit.h>

//新浪微博SDK头文件
//#import "WeiboSDK.h"

typedef enum {
    WY3SDK_UrlType_Public                         = 0x00000001,//外网pro
    WY3SDK_UrlType_PublicTest                     = 0x00000002,
    WY3SDK_UrlType_LanChaijing                    = 0x00000004,
    WY3SDK_UrlType_LanTest                        = 0x00000008
} WY3SDK_UrlType;


typedef enum{
    WY3SDK_AppType_JR   = 01,
    WY3SDK_AppType_Why  = 02
} WY3SDK_AppType;

typedef enum {
    WY3SDK_DefualtRole_Defult       = -1,
    WY3SDK_DefualtRole_Parent       = 1,
    WY3SDK_DefualtRole_Kid          = 2,
    WY3SDK_DefualtRole_Teacher      = 3
}WY3SDK_DefualtRoleType;

typedef void(^Process)(BOOL);

@interface WY3SDKLogin : NSObject

//必须初始化 //appid
+ (void)setAppId:(NSString *)appId andSecretKey:(NSString *)appsecretkey rootVC:(UIViewController*)rootVC;

//设置Debug 网络
+ (void)setURLDebug:(WY3SDK_UrlType)type;

//设置应用类型type
+ (void)setWY3SDKAppType:(WY3SDK_AppType)type;

+ (NSString*)get_idfv;

//设置应用默认角色
+ (void)setDefultRoletype:(WY3SDK_DefualtRoleType)defultRoleType;

//旋转方向
+ (UIInterfaceOrientationMask)rotation;
+ (UIInterfaceOrientationMask)rotationTo;
+ (void)setRotationTo:(UIInterfaceOrientationMask)rotation;
+ (UIInterfaceOrientationMask)rotationBack;
+ (void)setRotationBack:(UIInterfaceOrientationMask)rotation;

//关闭当前所有页面
+ (void)dismissSDKVC;

//显示Debuglog
+ (void)setDebugLog:(BOOL)yn;

//显示DebugLabel
+ (void)setDebugLabel:(BOOL)yn;

//显示状态栏
+ (void)setStatusBarHidden:(BOOL)yn;

//显示在LoginView 右下角信息，添加
+ (void)reSetDebugText:(NSString*)str;

//一账通的waittingView是否正在显示
+ (BOOL)isWY3WaittingShowing;

//获得sdk 版本
+ (NSString*)sdk_version;


//获得用户头像url
+ (NSString *)getWY3Avatar;
//设置用户头像
+ (BOOL)setWY3SDKAvatarForImageView:(UIImageView *)imgView palaceHolder:(UIImage *)palaceHolder;

//判断是否已经登录
+ (BOOL)isLogIn;

//判断当前VC是否属于WY3SDK
+ (BOOL)isWY3SDK_ViewController:(UIViewController*)vc;

//登陆
//@ reg = yes 不进行自动登录，弹出注册界面
//@ reg = no 会使用token 和 uid 自动登录（更新user信息）,或者弹出登录界面


//修改密码
+ (void)changePassWordCommplete:(void(^)(BOOL changeSuccess))complete currentVC:(UIViewController*)currentVC;;

//登出
+ (void)logOut;


//我的邀请码
+ (void)myQrCodeWithCurrentVC:(UIViewController*)currentVC;

//家长绑定孩子
+ (void)parentBindChildCommplete:(void(^)(BOOL bindSuccess))complete currentVC:(UIViewController*)currentVC;

//家长解绑孩子
+ (void)ParentUBindChildWithKuid:(long long)kuid Ktoken:(NSString *)ktoken Commplete:(void(^)(BOOL ubindSuccess))complete currentVC:(UIViewController *)currentVC;

//孩子绑定家长/解绑家长
+ (void)childBindParentCommplete:(void(^)(BOOL bindSuccess))complete currentVC:(UIViewController *)currentVC;


//孩子加入班级/查看班级信息
+ (void)childJoinClassWithWithCommplete:(void(^)(BOOL ubindSuccess))complete currentVC:(UIViewController*)currentVC;

//教师加入流程
+ (void)teahcerWorkFlowWithCurrentVC:(UIViewController *)currentVC didChangeStatus:(void(^)(BOOL ischangeStatus))isChangeStatus;

//教师查看已加入班级的详情
+ (void)teacherCheckClassInfoWithClassId:(long)classId currentVc:(UIViewController *)currentVC didChangeStatus:(void(^)(BOOL ischangeStatus))isChangeStatus;

//教师查看小组详情
+ (void)checkGroupInfoWithGroupNo:(long)groupNo groupName:(NSString *)groupName gouopCount:(NSInteger)count currentVc:(UIViewController *)currentVC didChangeStatus:(void(^)(BOOL ischangeStatus))isChangeStatus;


/**用户查看群组详情或加入群组*/
+ (void)childJoinfGroupComplete:(void(^)())complete currentVC:(UIViewController*)currentVC;

//获取设备信息
+(void)deviceInfoCollectOnVC:(UIViewController*)onVC Exist:(void (^)(BOOL isExist))exist Completed:(void (^)(BOOL isFinish))completed;
//清除设备信息
+(void)deleteDeviceInfo;
//获取是否属于设备信息获取类
+(BOOL)isCollectDeviceInfoVC:(UIViewController*)vc;
@end
